import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import { IndexRouteObject, NonIndexRouteObject, RouteObject } from 'react-router-dom';

export type NavItem = {
  pathForLink: string;
  displayName: string;
  icon: IconDefinition;
  end?: boolean;
};

type NavableIndexRouteObject = NavItem & { end: true } & IndexRouteObject;

type NavableNonIndexRouteObject = NavItem & { end?: false } & NonIndexRouteObject;

export type NavableRouteObject = NavableIndexRouteObject | NavableNonIndexRouteObject;
